<?php

namespace Forum\ForumBundle\Entity;

/**
 * @orm:Entity
 * @orm:Table(name="topic")
 */
class Topic {
    /**
     *
     * @orm:ID
     * @orm:Column(type="integer")
     * @orm:GeneratedValue(strategy="AUTO")
     */
    protected $id_topic;

    /**
     *
     * @orm:Column(type="string", length="255")
     */
    protected $nom_topic;

    /**
     *
     * @orm:Column(type="datetime", nullable="true")
     */
    protected $date_topic;

    /**
     *
     * @orm:Column(type="integer")
     */
    protected $vue = 0;

    /**
     *
     * @orm:ManyToOne(targetEntity="Blog\AccBundle\Entity\Membre", inversedBy="topics")
     * @orm:JoinColumn(name="membre", referencedColumnName="id_membre")
     */
    protected $membre;

    /**
     *
     * @orm:ManyToOne(targetEntity="CategorieTopic", inversedBy="topics")
     * @orm:JoinColumn(name="CategorieTopic", referencedColumnName="id_categorie")
     */
    protected $CategorieTopic;
    
    /**
     * @orm:OneToMany(targetEntity="Message", mappedBy="topic")
     */
    protected $messages;

    function __construct(){
        $this->messages = new \Doctrine\Common\Collections\ArrayCollection();

    }

    public function getId_topic() {
        return $this->id_topic;
    }

    public function getNom_topic() {
        return $this->nom_topic;
    }

    public function setNom_topic($nom_topic) {
        $this->nom_topic = $nom_topic;
    }

    public function getDate_topic() {
        return $this->date_topic;
    }

    public function setDate_topic($date_topic) {
        $this->date_topic = $date_topic;
    }

    public function getVue() {
        return $this->vue;
    }

    public function setVue($vue) {
        $this->vue = $vue;
    }

    public function getMembre() {
        return $this->membre;
    }

    public function setMembre($membre) {
        $this->membre = $membre;
    }

    public function getMessages() {
        return $this->messages;
    }

    public function setMessages($messages) {
        $this->messages = $messages;
    }

    public function getCategorieTopic() {
        return $this->CategorieTopic;
    }

    public function setCategorieTopic($CategorieTopic) {
        $this->CategorieTopic = $CategorieTopic;
    }


}

?>
